package com.yicheng.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yicheng.dao.ImageDao;
import com.yicheng.entity.Image;
import com.yicheng.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImageServiceImpl extends ServiceImpl<ImageDao, Image> implements ImageService {
    @Autowired
    private ImageDao imageDao;

    @Override
    public List<Image> getImages(int cate) {
        LambdaQueryWrapper<Image> lwq = new LambdaQueryWrapper<>();
        lwq.eq(true,Image::getCate,cate);
        return imageDao.selectList(lwq);
    }
}
